namespace CSharpPro._1028;

public class User
{
    // 私有字段
    private string _username;
    private string _password;

    // 公开属性（供外部访问）
    public string Username
    {
        get { return _username; }
        set { _username = value; }
    }

    public string Password
    {
        get { return _password; }
        set { _password = value; }
    }

    // 构造函数：初始化用户名和密码
    public User(string username, string password)
    {
        _username = username;
        _password = password;
    }
}